Bot API
The Bot API is a generic API for connecting Live Hub to a bot you have built yourself, or to middleware that fronts one. Use it when your bot does not run on a framework Live Hub already integrates with. See Bot frameworks for the list of those frameworks.
The API is deliberately plain: JSON over HTTP or a WebSocket, authenticated with a bearer token. It needs no special handling to cross firewalls and HTTP proxies, and a bot that implements it can use the full range of Live Hub features.
Modes of operation
The API has two modes. Which one you use is fixed when you create the bot connection, in
the 'Bot connection API type' field, the acBotApiType parameter behind it. See
AudioCodes Bot API.
| 'Bot connection API type' | acBotApiType
|
Built on | Suits |
|---|---|---|---|
| HTTP mode | chat (default) |
HTTP request and response | Simple, stateless bots, such as one hosted in AWS Lambda. See HTTP mode. |
| WebSocket mode | streaming
|
A bi-directional WebSocket | Stateful bots. Adds proactive messages from the bot, and audio streaming in both directions. See WebSocket mode. |
HTTP mode can also open a WebSocket alongside the request-response exchange, used only for proactive messages from the bot. See Send activities over a WebSocket.